package shaders;

import java.awt.Color;

import javax.vecmath.Vector3d;

import essential.Ray;

public class BumpShader extends Shader {

	
	public BumpShader(){
		bump = Shader.bumpType.Turbulence;
		per.persistence = 0.5;
		per.n = 1;
	}
	
	@Override
	public Color calculateColor2d(int x, int y) {
		return null;
	}

	@Override
	public Color calculateColor3d(Ray r, Vector3d sp) {
		return color;
	}

	public Shader copy() {
		Shader s = new BumpShader();
		this.copyFromTo(this,s);
		return s;
	}


	@Override
	public double fBump(double x, double y, double z) {
		// Cambiando esta función varía el bump 
		double amount =  per.stripes(x + per.turbulence(x,y,z,1),3);
		//amount = amount - Math.floor(amount);
		return amount;
	}

	@Override
	public Color textureColor(double x, double y) {
		return null;
	}

}
